'use strict';

module.exports = app => {
  const mongoose = app.mongoose;
  const Schema = mongoose.Schema;

  const AlertSchema = new Schema({
    user_id: {type: String},
    email: {type: String},
    delivery_hours: {type: [Number], default: [8]},
    kws: [String],
    last_delivery_at: {type: Date},
  }, {timestamps: true});


  return mongoose.model('Alert', AlertSchema, 'alerts');
};
